gtk4.git
5 years agogtk-demo: Fix a typo
Matthias Clasen [Sat, 3 Oct 2020 03:54:15 +0000 (23:54 -0400)]
gtk-demo: Fix a typo

5 years agoAllow inserting newlines in css strings
Matthias Clasen [Sat, 3 Oct 2020 02:31:29 +0000 (22:31 -0400)]
Allow inserting newlines in css strings

Rename _gtk_css_print_string to strip the _ and add
an insert_newlines argument to it. Update all callers,
and make the render node serializer insert newlines.

5 years agocss: Move _gtk_css_print_string around
Matthias Clasen [Sat, 3 Oct 2020 02:28:17 +0000 (22:28 -0400)]
css: Move _gtk_css_print_string around

Move this to a separate header, since it is not
parser functionality, and kill the duplicate
gtkcssparserprivate.h header.

5 years agoemojichooser: Allow inserting multiple Emoji
Matthias Clasen [Fri, 2 Oct 2020 03:35:06 +0000 (23:35 -0400)]
emojichooser: Allow inserting multiple Emoji

Don't close the Emoji chooser when the Control
key is held while clicking. So you can insert
multiple Emoji without having to reopen the
chooser every time.

Fixes: #1002
5 years agoAdd a test for gsk_gl_shader_compile
Matthias Clasen [Fri, 2 Oct 2020 01:25:39 +0000 (21:25 -0400)]
Add a test for gsk_gl_shader_compile

This is not super useful, but at least we can
test that we get an error message including the
shader text.

5 years agogdk: Remove an unused variable
Matthias Clasen [Thu, 1 Oct 2020 23:33:43 +0000 (19:33 -0400)]
gdk: Remove an unused variable

5 years agoAdd GTK_INPUT_HINT_PRIVATE
Matthias Clasen [Thu, 1 Oct 2020 21:14:58 +0000 (17:14 -0400)]
Add GTK_INPUT_HINT_PRIVATE

Add a flag that requests that input methods should not
update personalized data (such as typing history).

Fixes: #2261
5 years agodocs: Fix a copy-paste error
Matthias Clasen [Thu, 1 Oct 2020 21:07:53 +0000 (17:07 -0400)]
docs: Fix a copy-paste error

5 years agoUpdate the release script
Matthias Clasen [Thu, 1 Oct 2020 19:14:33 +0000 (15:14 -0400)]
Update the release script

If things go according to plan, we don't need to include
gtk-doc as a subproject in the next snapshot.

5 years agoUse gtk-doc from master
Matthias Clasen [Thu, 1 Oct 2020 19:11:37 +0000 (15:11 -0400)]
Use gtk-doc from master

I've merged the relevant parts from the gtk-doc-for-gtk4
branch.

5 years agoRequire gtk-doc 1.33
Matthias Clasen [Thu, 1 Oct 2020 19:08:50 +0000 (15:08 -0400)]
Require gtk-doc 1.33

We'll hopefully get a gtk-doc release out with that
version number soon.

5 years agoCosmetics
Matthias Clasen [Thu, 1 Oct 2020 17:48:08 +0000 (13:48 -0400)]
Cosmetics

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 1 Oct 2020 14:21:34 +0000 (14:21 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3220

See merge request GNOME/gtk!2652

5 years agoMerge branch 'master' into 'matthiasc/for-master'
Matthias Clasen [Thu, 1 Oct 2020 13:56:37 +0000 (13:56 +0000)]
Merge branch 'master' into 'matthiasc/for-master'

# Conflicts:
#   .gitlab-ci/test-msys2.sh

5 years agoMerge branch 'ci-win32-introspection-enabled' into 'master'
Matthias Clasen [Thu, 1 Oct 2020 13:50:02 +0000 (13:50 +0000)]
Merge branch 'ci-win32-introspection-enabled' into 'master'

CI: Enable introspection again for the Windows build

See merge request GNOME/gtk!2651

5 years agoCI: Enable introspection again for the Windows build
Christoph Reiter [Thu, 1 Oct 2020 13:16:18 +0000 (15:16 +0200)]
CI: Enable introspection again for the Windows build

The underlying bug was fixed in glib and backported in MSYS2:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1665

5 years agoMerge branch 'wip/jimmac/infosearch-close' into 'master'
Matthias Clasen [Thu, 1 Oct 2020 12:01:23 +0000 (12:01 +0000)]
Merge branch 'wip/jimmac/infosearch-close' into 'master'

Adwaita: close button for infobar, searchbar

Closes #3215

See merge request GNOME/gtk!2650

5 years agoRevert "Fix the build with cups < 2.3"
Matthias Clasen [Thu, 1 Oct 2020 11:59:30 +0000 (07:59 -0400)]
Revert "Fix the build with cups < 2.3"

This reverts commit d761e3cf2c31b91269a3dbfd64a553decdeec51c.

I am seeing PPD_CUSTOM_UNKNOWN in the cups headers in our
ci images, and that is cups 2.2.12. So this commit was
mistaken.

5 years agoci: Give up on sysprof for now
Matthias Clasen [Thu, 1 Oct 2020 11:37:44 +0000 (07:37 -0400)]
ci: Give up on sysprof for now

Using sysprof and glib as subprojects of the same
project sadly does not work. Subprojects are not
as robust as they should be.

5 years agoAdwaita: close button for infobar, searchbar
Jakub Steiner [Thu, 1 Oct 2020 11:13:10 +0000 (13:13 +0200)]
Adwaita: close button for infobar, searchbar

fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3215

5 years agoci: Try to get everything building again
Matthias Clasen [Thu, 1 Oct 2020 03:37:09 +0000 (23:37 -0400)]
ci: Try to get everything building again

It turns out that the sysprof meson setup does not
work with meson 0.54 :( So version 25 of our ci images
bumps the meson version to 0.55.3.

5 years agobuild: Try to fix docs+subprojects
Matthias Clasen [Wed, 30 Sep 2020 20:21:39 +0000 (16:21 -0400)]
build: Try to fix docs+subprojects

Apparently, subprojects don't have pkgconfig variables :(

5 years agobuild: Remove an unneeded version check
Matthias Clasen [Wed, 30 Sep 2020 20:09:56 +0000 (16:09 -0400)]
build: Remove an unneeded version check

We are requiring a newer meson than we were checking
for here.

5 years agoci: Remove --fatal-meson-warnings
Matthias Clasen [Wed, 30 Sep 2020 19:53:15 +0000 (15:53 -0400)]
ci: Remove --fatal-meson-warnings

meson adds features that then trigger warnings when we run
a newer meson over some of our subprojects. This is all too
fragile.

5 years agogtk-demo: Add the shader paintable sources
Matthias Clasen [Wed, 30 Sep 2020 19:41:05 +0000 (15:41 -0400)]
gtk-demo: Add the shader paintable sources

This is currently not public GTK api, just part of
the demo. So we should show it here.

5 years agogsk: Fix compiler warnings
Matthias Clasen [Wed, 30 Sep 2020 19:39:30 +0000 (15:39 -0400)]
gsk: Fix compiler warnings

We forgot to teach the broadway renderer about new enum
values, and our ci didn't catch it because werror didn't
actually work there until now.

5 years agobuild: Require meson 0.54
Matthias Clasen [Wed, 30 Sep 2020 19:10:34 +0000 (15:10 -0400)]
build: Require meson 0.54

5 years agoci: Really enable werror
Matthias Clasen [Wed, 30 Sep 2020 18:45:47 +0000 (14:45 -0400)]
ci: Really enable werror

We wanted to enable werror for gtk without enabling it
for all our subprojects. Sadly, we failed. Try again

5 years agoci: Use the v24 images
Matthias Clasen [Wed, 30 Sep 2020 19:25:51 +0000 (15:25 -0400)]
ci: Use the v24 images

These images have meson 0.54.

5 years agoci: Use a newer meson in images
Matthias Clasen [Wed, 30 Sep 2020 19:12:32 +0000 (15:12 -0400)]
ci: Use a newer meson in images

We need meson 0.54.

5 years agomeson: Change introspection option to yielding feature
Xavier Claessens [Wed, 30 Sep 2020 13:41:28 +0000 (09:41 -0400)]
meson: Change introspection option to yielding feature

Yielding option means that if pango is built as a subproject, it will
take the value of that option from the parent project (e.g. gst-build).
For that to work it must be of the same type, which is "feature" instead
of "boolean" in all GStreamer modules.

5 years agoUse correct child widget when measuring
Benjamin Otte [Wed, 30 Sep 2020 17:48:24 +0000 (17:48 +0000)]
Use correct child widget when measuring

Fixes a copy/paste error.

Fixed #3220

5 years agoMerge branch 'introspection' into 'master'
Matthias Clasen [Wed, 30 Sep 2020 17:50:21 +0000 (17:50 +0000)]
Merge branch 'introspection' into 'master'

meson: Change introspection option to yielding feature

See merge request GNOME/gtk!2648

5 years agoUse correct child widget when measuring
Benjamin Otte [Wed, 30 Sep 2020 17:48:24 +0000 (17:48 +0000)]
Use correct child widget when measuring

Fixes a copy/paste error.

Fixed #3220

5 years agotransition demo: Make buttons symbolic
Matthias Clasen [Wed, 30 Sep 2020 17:40:59 +0000 (13:40 -0400)]
transition demo: Make buttons symbolic

It looks better.

5 years agoMerge branch 'ebassi/for-master' into 'master'
Matthias Clasen [Wed, 30 Sep 2020 15:22:57 +0000 (15:22 +0000)]
Merge branch 'ebassi/for-master' into 'master'

demo: Replace g_print with g_debug

See merge request GNOME/gtk!2645

5 years agogtk-demo: Update text for the transitions demo
Matthias Clasen [Wed, 30 Sep 2020 15:19:12 +0000 (11:19 -0400)]
gtk-demo: Update text for the transitions demo

The fire is gone, but we have wobbly widgets!

5 years agoMerge branch 'snazzy-demo' into 'master'
Matthias Clasen [Wed, 30 Sep 2020 15:00:58 +0000 (15:00 +0000)]
Merge branch 'snazzy-demo' into 'master'

gtk-demo: Make gltransitions demo a bit snazzier

See merge request GNOME/gtk!2644

5 years agogtk-demo/gltransition: Replace fire background with more mellow blobs
Alexander Larsson [Wed, 30 Sep 2020 14:26:03 +0000 (16:26 +0200)]
gtk-demo/gltransition: Replace fire background with more mellow blobs

5 years agogtk-demo: Use duck in transitions to get some alpha example
Alexander Larsson [Wed, 30 Sep 2020 14:25:30 +0000 (16:25 +0200)]
gtk-demo: Use duck in transitions to get some alpha example

5 years agomeson: Change introspection option to yielding feature
Xavier Claessens [Wed, 30 Sep 2020 13:41:28 +0000 (09:41 -0400)]
meson: Change introspection option to yielding feature

Yielding option means that if pango is built as a subproject, it will
take the value of that option from the parent project (e.g. gst-build).
For that to work it must be of the same type, which is "feature" instead
of "boolean" in all GStreamer modules.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Wed, 30 Sep 2020 13:42:55 +0000 (13:42 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2647

5 years agoMention icon theme in the migration guide
Matthias Clasen [Wed, 30 Sep 2020 12:49:42 +0000 (08:49 -0400)]
Mention icon theme in the migration guide

This was requested in #3216.

5 years agoicontheme: Clarify the docs
Matthias Clasen [Wed, 30 Sep 2020 12:01:50 +0000 (08:01 -0400)]
icontheme: Clarify the docs

Mention that icons directly in /$app_id/icons/ are treated
as unthemed icons.

See #3216

5 years agogl renderer: Fix render node texture cache
Alexander Larsson [Wed, 30 Sep 2020 12:53:13 +0000 (14:53 +0200)]
gl renderer: Fix render node texture cache

We're caching two things, either a node itself being rendered, or a
parent storing a cached version of a child as rendered to an offscreen
the size and location of the parent.

If both the parent and child uses the cache this will cause a conflict in
the cache as it is currently use keying of a node pointer which will have
the same value for the node-as-itself and the child-node-of-the-parent.

We fix this by adding another part to the key "pointer_is_child" which means
we can have the same node pointer twice in the cache.

Additionally, in the child-is-rendered-offscreen case the offscreen
result actually depends on the position and size of the parent viewport,
so we need to store the parent bounds in that case.

5 years agodemo: Replace g_print with g_debug
Emmanuele Bassi [Wed, 30 Sep 2020 11:35:31 +0000 (12:35 +0100)]
demo: Replace g_print with g_debug

The GtkGears widget is a bit too chatty, especially when used inside
demos like the fishbowl. Let's use g_debug() instead of g_print() for
the GL debugging message.

5 years agoFix the release script some more
Matthias Clasen [Tue, 29 Sep 2020 21:29:24 +0000 (17:29 -0400)]
Fix the release script some more

Still trying to master the tar commandline.

5 years agogtk-demo: Make gltransitions demo a bit snazzier
Alexander Larsson [Wed, 30 Sep 2020 09:40:37 +0000 (11:40 +0200)]
gtk-demo: Make gltransitions demo a bit snazzier

This adds a bunch of snazz to the gltransitions demo. It is perhaps
a bit overloaded now, but it demos everything that we can do.

Changes:
 * The fire shader is now not a bin, it just renders an animating
   background with no textures involved.
 * The stacks don't all start on the same page.
 * The shaderbin passes the mouse coordinate to the shader.
 * The shaderbin allows specifying a "border" so that you can
   cause effects outside the bin child (something that is new to gtk4).
 * All the buttons and the stacks are now in shader-bins that runs
   a wobbly-widget effect based on the mouse position that
   wobbles outside the child allocation.

5 years agoMerge branch 'small-cleanup' into 'master'
Matthias Clasen [Tue, 29 Sep 2020 21:52:37 +0000 (21:52 +0000)]
Merge branch 'small-cleanup' into 'master'

menubutton: Remove obsolete private method

See merge request GNOME/gtk!2643

5 years agoMerge branch 'ebassi/for-master' into 'master'
Matthias Clasen [Tue, 29 Sep 2020 20:45:00 +0000 (20:45 +0000)]
Merge branch 'ebassi/for-master' into 'master'

Ebassi/for master

See merge request GNOME/gtk!2642

5 years agorelease script: Fix doc tarball generation
Matthias Clasen [Tue, 29 Sep 2020 19:07:13 +0000 (15:07 -0400)]
release script: Fix doc tarball generation

Strip one level from the directories.

5 years agomenubutton: Remove obsolete private method
Florian Müllner [Tue, 29 Sep 2020 18:46:18 +0000 (20:46 +0200)]
menubutton: Remove obsolete private method

It was only added for the fallback app menu in headerbars, which
has been removed in the meantime.

5 years agoAdd annotations for GtkBuildable virtual functions
Emmanuele Bassi [Tue, 29 Sep 2020 18:48:55 +0000 (19:48 +0100)]
Add annotations for GtkBuildable virtual functions

Now that the functions that wrap them have gone away from the public
API, we need proper annotations for the virtual functions, otherwise
languages will not have enough information on nullable arguments and
ownership transfer.

5 years ago3.99.2
Matthias Clasen [Tue, 29 Sep 2020 12:55:08 +0000 (08:55 -0400)]
3.99.2

5 years agogsk: Add some more shader docs
Matthias Clasen [Tue, 29 Sep 2020 15:32:03 +0000 (11:32 -0400)]
gsk: Add some more shader docs

Do a pass over the docs and address minor inconsistencies,
cosmetics and formatting differences.

Mention GSK_DEBUG=shaders.

5 years agoMerge branch 'snapshot-stack-optimize' into 'master'
Matthias Clasen [Tue, 29 Sep 2020 18:44:07 +0000 (18:44 +0000)]
Merge branch 'snapshot-stack-optimize' into 'master'

Minor optimizations to GtkSnapshot state stack

See merge request GNOME/gtk!2641

5 years agoRemove gtk-doc stanzas from private GtkBuildable API
Emmanuele Bassi [Tue, 29 Sep 2020 18:39:34 +0000 (19:39 +0100)]
Remove gtk-doc stanzas from private GtkBuildable API

Various functions were moved to the private GtkBuildable header by
commit 2715b3ec31256ee1c3e0276fdc0154cd8a69fa8e, but the functions still
have gtk-doc stanzas.

5 years agosnapshot: Preallocate and don't memset the state stack
Alexander Larsson [Tue, 29 Sep 2020 14:03:06 +0000 (16:03 +0200)]
snapshot: Preallocate and don't memset the state stack

Most of the time the snapshot is less than 16 levels deep (did some testing
in gtk-demo), so lets pre-allocate 16 levels of state stack to avoid the
extra allocation most of the time.

5 years agogdkarray: Add support for GDK_ARRAY_NO_MEMSET
Alexander Larsson [Tue, 29 Sep 2020 14:00:30 +0000 (16:00 +0200)]
gdkarray: Add support for GDK_ARRAY_NO_MEMSET

If all your callers already initialize the array element as needed,
then we don't need to memset it to zero first.

This is pretty useful for the snapshot state stack, because due
to the per-node-type data area the elements on the stack are
quite large, but often a lot of it is not used.

5 years agogdkarray: Inline splice and reserve
Alexander Larsson [Tue, 29 Sep 2020 13:57:33 +0000 (15:57 +0200)]
gdkarray: Inline splice and reserve

This inlines the splice and reserver GdkArray calls. These are
typically only called from the gdk_array_(append/set_size) functions
anyway, and inlining the caller means we can constant propagate the
constant arguments in those calls. Its hard to get exact numbers, but
in fishbowl i noticed a significant decrease in the time spent in
the array code when pushing and poping states.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 29 Sep 2020 12:57:36 +0000 (12:57 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2639

5 years agoMerge branch 'glshader-track-uniform-state' into 'master'
Matthias Clasen [Tue, 29 Sep 2020 12:49:22 +0000 (12:49 +0000)]
Merge branch 'glshader-track-uniform-state' into 'master'

gl: Track the current uniform state for custom programs

See merge request GNOME/gtk!2638

5 years agodocs: Document various entry ::activate signals
Matthias Clasen [Tue, 29 Sep 2020 02:52:35 +0000 (22:52 -0400)]
docs: Document various entry ::activate signals

5 years agostatusbar: Remove a misleading doc comment
Matthias Clasen [Tue, 29 Sep 2020 02:43:42 +0000 (22:43 -0400)]
statusbar: Remove a misleading doc comment

5 years agosnapshot: Document radial gradient apis
Matthias Clasen [Tue, 29 Sep 2020 02:43:27 +0000 (22:43 -0400)]
snapshot: Document radial gradient apis

5 years agodocs: Fix a typo
Matthias Clasen [Tue, 29 Sep 2020 02:43:17 +0000 (22:43 -0400)]
docs: Fix a typo

5 years agowayland: Match header and doc arguments
Matthias Clasen [Tue, 29 Sep 2020 02:28:09 +0000 (22:28 -0400)]
wayland: Match header and doc arguments

gtk-doc doesn't take this lightly.

5 years agogsk: Document radial gradient api
Matthias Clasen [Tue, 29 Sep 2020 02:24:59 +0000 (22:24 -0400)]
gsk: Document radial gradient api

5 years agoSilence a compiler warning
Matthias Clasen [Tue, 29 Sep 2020 02:12:31 +0000 (22:12 -0400)]
Silence a compiler warning

These variables are not used anymore since
commit 11e4a4696713bc.

5 years agoNEWS: Updates
Matthias Clasen [Tue, 29 Sep 2020 11:03:02 +0000 (07:03 -0400)]
NEWS: Updates

5 years agogl: Track the current uniform state for custom programs
Alexander Larsson [Tue, 29 Sep 2020 09:52:39 +0000 (11:52 +0200)]
gl: Track the current uniform state for custom programs

This allows us to avoid updating uniforms if that is not necessary. This
in turn allows us to sometimes reuse the same draw op by just extending the
vertex array size we draw rather than doing a separate glDraw call.

For example, in the fishbowl demo, all the icons added at the same
time will have the same time and size, so we emit single draw calls
with 100s of triangles instead of 100s of draw calls with 2 triangles.

5 years agoMerge branch 'glshader-node' into 'master'
Alexander Larsson [Tue, 29 Sep 2020 08:30:48 +0000 (08:30 +0000)]
Merge branch 'glshader-node' into 'master'

Add support for GLShader nodes

See merge request GNOME/gtk!2594

5 years agoAdd some shader tests
Matthias Clasen [Wed, 23 Sep 2020 22:05:57 +0000 (18:05 -0400)]
Add some shader tests

These are just basic api usage tests, no rendering.
They found the issues fixed in the preceding commits.

5 years agogtk-demo: Add a shader paintable to the fishbowl
Alexander Larsson [Tue, 29 Sep 2020 07:36:10 +0000 (09:36 +0200)]
gtk-demo: Add a shader paintable to the fishbowl

This gets around 500 instances at 60fps on my system.

5 years agogtk-demo: Add GskGLShaderNode demo
Alexander Larsson [Mon, 21 Sep 2020 19:05:04 +0000 (21:05 +0200)]
gtk-demo: Add GskGLShaderNode demo

Add adds a demo showing off GskGLShaderNode in various ways.

It has a transistion widget, using some examples from
gl-transitions.com, with child widgets being both images, a GL area
and real widgets (that let you edit the transition shaders
themselves.

It also has a fancy fire effect on hove on the buttons.

5 years agoSupport GLShaderNode in backends
Alexander Larsson [Fri, 18 Sep 2020 16:03:30 +0000 (18:03 +0200)]
Support GLShaderNode in backends

For vulkan/broadway this just means to ignore it, but for the gl
backend we support (with up to 4 texture inputs, which is similar to
what shadertoy does, so should be widely supported).

5 years agoGtkSnapshot: Add gtk_snapshot_push_glshader()
Alexander Larsson [Fri, 18 Sep 2020 15:56:02 +0000 (17:56 +0200)]
GtkSnapshot: Add gtk_snapshot_push_glshader()

5 years agoAdd GskGLShaderNode and GskGLShader
Alexander Larsson [Fri, 18 Sep 2020 15:46:57 +0000 (17:46 +0200)]
Add GskGLShaderNode and GskGLShader

A GskGLShader is an abstraction of a GLSL fragment shader that
can produce pixel values given inputs:
 * N (currently max 4) textures
 * Current arguments for the shader uniform
Uniform types are: float,(u)int,bool,vec234)
There is also a builder for the uniform arguments which are
passed around as immutable GBytes in the built form.

A GskGLShaderNode is a render node that renders a GskGLShader inside a
specified rectangular bounds. It renders its child nodes as textures
and passes those as texture arguments to the shader. You also pass it
a uniform arguments object.

5 years agogsk: Add more shader debug spew
Matthias Clasen [Wed, 23 Sep 2020 20:17:56 +0000 (16:17 -0400)]
gsk: Add more shader debug spew

Print out the full assembled shader sources when
GSK_DEBUG=shaders is given. This is very verbose,
but may be useful to see what we actually pass
to the compiler.

5 years agoGtkWindow: Create renderer before realizing child widgets
Alexander Larsson [Mon, 28 Sep 2020 18:47:32 +0000 (20:47 +0200)]
GtkWindow: Create renderer before realizing child widgets

This way the child widgets can rely on the renderer (for example what
type it is) to decide details about how they render (such as if they
should use OpenGL shaders).

5 years agocss: Move the last parser api to the new header
Matthias Clasen [Mon, 28 Sep 2020 17:09:54 +0000 (13:09 -0400)]
css: Move the last parser api to the new header

This lets us use it from the render node parser
in gsk.

5 years agoshadertoy demo: Fix GLSL on GLES
Alexander Larsson [Wed, 23 Sep 2020 15:38:03 +0000 (17:38 +0200)]
shadertoy demo: Fix GLSL on GLES

I was getting "assignment to varying fragColor" errors

5 years agogl: Add some namespacing to the preamble symbols
Alexander Larsson [Fri, 18 Sep 2020 09:35:29 +0000 (11:35 +0200)]
gl: Add some namespacing to the preamble symbols

This adds a gsk prefix to the stuff in the preamble, as we want to
avoid it conflicting with things in the main shader. Especially once
we start allow some customization of shaders.

5 years agogl backend: Add line numbers to source in glsl compilation errors
Alexander Larsson [Mon, 21 Sep 2020 13:14:40 +0000 (15:14 +0200)]
gl backend: Add line numbers to source in glsl compilation errors

Almost always the source is created by combining various sources, which
means the line numbers in the error messages are hard to use. Adding
the line numbers to the source in the error message helps with this.

5 years agogl: Properly report error if shader linking fails
Alexander Larsson [Fri, 18 Sep 2020 09:34:14 +0000 (11:34 +0200)]
gl: Properly report error if shader linking fails

In gsk_gl_shader_builder_create_program(), if linking fails we
need to return -1 to indicate error, rather than the old deleted
program id.

5 years agoglrenderer: Move ProgramState into Program
Alexander Larsson [Fri, 18 Sep 2020 07:15:03 +0000 (09:15 +0200)]
glrenderer: Move ProgramState into Program

There is no real reason to have this on the side indexed via the
index, as it is stored next to each other anyway. Plus, storing them
together lets use use `Program` structures not in the array.

5 years agoMerge branch 'arnaudb/menubutton-direction' into 'master'
Matthias Clasen [Tue, 29 Sep 2020 01:55:24 +0000 (01:55 +0000)]
Merge branch 'arnaudb/menubutton-direction' into 'master'

Make GtkMenuButton::direction more useful.

Closes #2811

See merge request GNOME/gtk!2636

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 29 Sep 2020 01:53:02 +0000 (01:53 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3202

See merge request GNOME/gtk!2637

5 years agoAdd a reftest for flipping transforms
Matthias Clasen [Tue, 29 Sep 2020 00:32:27 +0000 (20:32 -0400)]
Add a reftest for flipping transforms

Verify that a scale of -1 does in fact cause a
gradient to go the other direction.

5 years agotextbuffer: Elaborate docs
Matthias Clasen [Sun, 27 Sep 2020 15:24:18 +0000 (11:24 -0400)]
textbuffer: Elaborate docs

Explain a bit more what gtk_text_buffer_get_content_provider()
is for.

Fixes: #3202
5 years agowindow: Don't get surfaces needlessly
Matthias Clasen [Sun, 27 Sep 2020 12:57:05 +0000 (08:57 -0400)]
window: Don't get surfaces needlessly

There is a 1-1 correspondence between natives and
surfaces, so we can just compare the natives, no
need to get the surface for every single one.

5 years agodoc: Document some apis as widget implementor only
Matthias Clasen [Sun, 27 Sep 2020 03:33:39 +0000 (23:33 -0400)]
doc: Document some apis as widget implementor only

A better solution for this would be nice. For the
time being, just add a sentence to the docs.

5 years agoMake GtkMenuButton::direction more useful.
Arnaud Bonatti [Mon, 28 Sep 2020 15:30:30 +0000 (17:30 +0200)]
Make GtkMenuButton::direction more useful.

This property was only used until now when
there was neither an icon nor a label set,
for arrow direction and popover placement.

Starting with Gtk4, a GtkMenuButton with a
label shows an arrow at the right (in LTR)
of the label. Allow disabling the arrow or
changing its direction using the direction
property, to have a way to restore a Gtk3-
like look or to improve popover placement.

Fixes #2811.

5 years agoMerge branch 'wip/carlosg/for-master' into 'master'
Matthias Clasen [Mon, 28 Sep 2020 22:03:36 +0000 (22:03 +0000)]
Merge branch 'wip/carlosg/for-master' into 'master'

gtkeventcontrollerscroll: Drop device type checks

Closes #3210

See merge request GNOME/gtk!2635

5 years agogtkeventcontrollerscroll: Drop device type checks
Carlos Garnacho [Mon, 28 Sep 2020 21:30:05 +0000 (23:30 +0200)]
gtkeventcontrollerscroll: Drop device type checks

Kinetic scrolling (and begin/end tracking) broke with commit cab1dcb696
since the pointing device used on X11 does not get as much GdkInputSource
granularity as the source device used to have in GTK3.

Actually this is kinda pointless, devices incapable of smooth scroll
should send discrete events, without those devices in the picture, we
want kinetic scroll to apply on every other device capable of smooth
scroll, so just do that.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3210
5 years agoUpdate Hebrew translation
Yosef Or Boczko [Mon, 28 Sep 2020 19:00:12 +0000 (19:00 +0000)]
Update Hebrew translation

(cherry picked from commit f6e3dfd73ef7f319d0827052854f5e26b4a2dcd0)

5 years agoUpdate Hebrew translation
Yosef Or Boczko [Mon, 28 Sep 2020 18:58:52 +0000 (18:58 +0000)]
Update Hebrew translation

(cherry picked from commit 02d1d9714ed07d1712d6f0e9c386e475f83ad986)

5 years agoMerge branch 'another-attempt-to-fix-shadertoy' into 'master'
Matthias Clasen [Mon, 28 Sep 2020 16:16:51 +0000 (16:16 +0000)]
Merge branch 'another-attempt-to-fix-shadertoy' into 'master'

Flip GLArea textures

See merge request GNOME/gtk!2634

5 years agoMerge branch 'cloudproviders-ci' into 'master'
Matthias Clasen [Mon, 28 Sep 2020 15:45:08 +0000 (15:45 +0000)]
Merge branch 'cloudproviders-ci' into 'master'

Cloudproviders ci

Closes #2480

See merge request GNOME/gtk!2632

5 years agoMerge branch 'wip/otte/for-master' into 'master'
Matthias Clasen [Mon, 28 Sep 2020 15:43:02 +0000 (15:43 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

snapshot: Don't flip textures

See merge request GNOME/gtk!2633